package com.platform.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.platform.common.bean.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import java.time.LocalDateTime;

/**
 * describe:页面元素表实体类
 *
 * @author rainly
 * @date 2019/12/06
 * @time 2:47 下午
 */
@ApiModel(value = "页面元素表", description = "页面元素表SysElement")
@Data
@TableName(value = "sys_element")
public class SysElement extends BaseEntity<SysElement> {

    @ApiModelProperty(value = "id", name = "element_id", example = "32位uuid", required = true)
    @Id
    @Column(name = "element_id", length = 32, columnDefinition = "varchar(32) COMMENT '主键'")
    @TableId(type = IdType.ASSIGN_ID)
    private String elementId;

    @ApiModelProperty(value = "元素名称", name = "element_name", example = "元素名称", required = true)
    @Column(name = "element_name", length = 50, columnDefinition = "varchar(50) COMMENT '元素名称'")
    private String elementName;

    @ApiModelProperty(value = "元素编码", name = "element_code", example = "元素编码", required = true)
    @Column(name = "element_code", length = 10, columnDefinition = "varchar(10) COMMENT '元素编码'")
    private String elementCode;

    @ApiModelProperty(value = "内容", name = "detail", example = "编辑人", required = true)
    @Column(name = "detail", length = 500, columnDefinition = "varchar(500) COMMENT '内容'")
    private String detail;

    @ApiModelProperty(value = "编辑人", name = "editor", example = "编辑人", required = true)
    @Column(name = "editor", length = 32, columnDefinition = "varchar(32) COMMENT '编辑人'")
    private String editor;

    @ApiModelProperty(value = "编辑时间", name = "edit_time", example = "编辑时间", required = true)
    @Column(name = "edit_time", length = 10, columnDefinition = "datetime COMMENT '编辑时间'")
    private LocalDateTime editTime;

    @ApiModelProperty(value = "描述", name = "info", example = "描述", required = true)
    @Column(name = "info", length = 100, columnDefinition = "varchar(100) COMMENT '描述'")
    private String info;

    @ApiModelProperty(value = "标记", name = "flag", example = "标记(diabale 删除 unable 正常)", required = true)
    @Column(name = "flag", length = 20, columnDefinition = "varchar(20) COMMENT '标记(diabale 删除 unable 正常)'")
    @TableField(fill = FieldFill.INSERT)
    private String flag;
}
